const mix = require('laravel-mix');
const path = require('path');

mix.js('resources/js/app.js', 'public/js')
   .vue()
   .sass('resources/sass/app.scss', 'public/css')
   .setPublicPath('public')
   .alias({
       '@': path.join(__dirname, 'resources/js')
   });

mix.webpackConfig({
    devServer: {
      proxy: {
          '*': 'http://localhost:8000'
      },
      hot: true,
      watchOptions: {
          poll: true,
      },
    }
});

if (mix.inProduction()) {
    mix.version();
}
